# the whole CMakeLists.txt for project ttiger
PROJECT(edm)

CMAKE_MINIMUM_REQUIRED(VERSION 2.4)

# include directories
INCLUDE_DIRECTORIES(
  ${PROJECT_SOURCE_DIR}/common
  ${PROJECT_SOURCE_DIR}/network
  /usr/include  
  /usr/local/include
  /opt/local/include
  /opt/edm/include
  /usr/local/include/boost
  /opt/local/include/boost
  /opt/edm/include/boost
)

# lib directories
LINK_DIRECTORIES(
  ${PROJECT_BINARY_DIR}/lib
  /opt/edm/lib
  /opt/local/lib  
  /usr/local/lib
  /use/lib
)

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
SET(CMAKE_INSTALL_PREFIX /opt/edm)

ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(network)
ADD_SUBDIRECTORY(maildrop)
ADD_SUBDIRECTORY(prepare)
#ADD_SUBDIRECTORY(dispatcher)
ADD_SUBDIRECTORY(delivery)

INSTALL(DIRECTORY conf/ DESTINATION conf PATTERN ".svn" EXCLUDE)
INSTALL(DIRECTORY udps/ DESTINATION udps PATTERN ".svn" EXCLUDE)
INSTALL(PROGRAMS scripts/status.sh scripts/stop_prepare.sh DESTINATION bin 
        PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ)
